
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     
    <html xmlns="http://www.w3.org/1999/xhtml">
    
<head>   
   

    <script type="text/javascript" src="http://c.csdnimg.cn/pubfooter/js/tracking.js" charset="utf-8"></script>  

    <script type="text/javascript">
        var protocol = window.location.protocol;
        document.write('<script type="text/javascript" src="' + protocol + '//csdnimg.cn/pubfooter/js/repoAddr2.js?v=' + Math.random() + '"></' + 'script>');
    </script>

  
 <meta http-equiv="Cache-Control" content="no-siteapp" /><link rel="alternate" media="handheld" href="#" />

    <title>Android中的AlarmManager的使用 - wangxingwu_314的专栏
        - 博客频道 - CSDN.NET</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="description" content="在Form1_Load事件中添加" />
    <script src="http://static.blog.csdn.net/scripts/jquery.js" type="text/javascript"></script>
      <script type="text/javascript" src="http://static.blog.csdn.net/scripts/jquery-version.js"></script>
    <script type="text/javascript" src="http://static.blog.csdn.net/scripts/ad.js?v=1.1"></script>
        <!--new top-->
               <link rel="stylesheet" href="http://c.csdnimg.cn/public/common/toolbar/css/index.css">        <!--new top-->
    
      <!-- ad begin -->
         <script language="javascript" type="text/javascript" src="http://ads.csdn.net/js/tracking.js"></script>
    <!-- ad end-->

    <link rel="Stylesheet" type="text/css" href="http://static.blog.csdn.net/skin/default/css/style.css?v=1.1" />
    <link id="RSSLink" title="RSS" type="application/rss+xml" rel="alternate" href="/wangxingwu_314/rss/list" />
    <link rel="shortcut icon" href="http://c.csdnimg.cn/public/favicon.ico" />
    <link type="text/css" rel="stylesheet" href="http://static.blog.csdn.net/scripts/SyntaxHighlighter/styles/default.css" />
 


<script>
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "//hm.baidu.com/hm.js?6bcd52f51e9b3dce32bec4a3997715ac";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>

</head>
<body>
    <!-- 广告位开始 -->
        <ins data-revive-zoneid="149" data-revive-id="8c38e720de1c90a6f6ff52f3f89c4d57"></ins>
    <!-- 广告位结束 -->

    
   
      <!--new top-->
    <script id="toolbar-tpl-scriptId" fixed="true" prod="blog" skin="black" src="http://c.csdnimg.cn/public/common/toolbar/js/html.js" type="text/javascript"></script>
     <!--new top-->
    <div id="container">
        <div id="header">
    <div class="header">
        <div id="blog_title">
            <h2>
                <a href="http://blog.csdn.net/wangxingwu_314">wangxingwu_314的专栏</a></h2>
            <h3></h3>
            <div class="clear">
            </div>
        </div>
        <div class="clear">
        </div>
        
     
    </div>
</div>
<div id="navigator">
    <div class="navigator_bg">
    </div>
    <div class="navigator">
        <ul>           
                <li id="btnContents"><a href="http://blog.csdn.net/wangxingwu_314?viewmode=contents"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_mulu'])">
                    <img src="http://static.blog.csdn.net/images/ico_list.gif">目录视图</span></a></li>
                <li id="btnView"><a href="http://blog.csdn.net/wangxingwu_314?viewmode=list"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_zhaiyao'])">
                    <img src="http://static.blog.csdn.net/images/ico_summary.gif">摘要视图</span></a></li>
                <li id="btnRss"><a href="http://blog.csdn.net/wangxingwu_314/rss/list"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_RSS'])">
                    <img src="http://static.blog.csdn.net/images/ico_rss.gif">订阅</span></a></li>                
            

            </ul>
    </div>
</div>
<script type="text/javascript">
    var username = "wangxingwu_314";
    var _blogger = username;
    var blog_address = "http://blog.csdn.net/wangxingwu_314";
    var static_host = "http://static.blog.csdn.net";
    var currentUserName = "";  
</script>

        <div id="body">
            <div id="main">
                <div class="main">
                        <div class="ad_class">
<div class="notice tracking-ad" data-mod='popu_3' > 
<a href="http://geek.csdn.net/news/detail/126445">
<font color=red>聚焦行业最佳实践，BDTC 2016完整议程公布
</font></a>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://huiyi.csdn.net/activity/product/goods_list?project_id=3287">
<font color=blue>微信小程序实战项目——点餐系统
</font></a>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="http://blog.csdn.net/turingbooks/article/details/53079366">
<font color=red>程序员11月书讯，评论得书啦 
</font></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="http://geek.csdn.net/news/detail/110921">
<font color=blue>Get IT技能知识库，50个领域一键直达
</font></a>


</font></a>
</font></a>
</div>                        </div>
                        


<!-- 广告位开始 -->
<ins data-revive-zoneid="72" data-revive-id="8c38e720de1c90a6f6ff52f3f89c4d57"></ins>
<!-- 广告位结束 -->

  
<link href="http://static.blog.csdn.net/css/comment1.css" type="text/css" rel="stylesheet" />
<link href="http://static.blog.csdn.net/css/style1.css" type="text/css" rel="stylesheet" />
<script language='JavaScript' type='text/javascript' src='http://download.csdn.net/js/jquery.cookie.js'></script>
<script type="text/javascript" src="http://c.csdnimg.cn/rabbit/search-service/main.js"></script>
<link rel="stylesheet" href="http://static.blog.csdn.net/public/res-min/markdown_views.css?v=1.0" />
<link rel="stylesheet" href="http://static.blog.csdn.net/css/category.css?v=1.0" />
<script type="text/javascript" src="http://static.blog.csdn.net/public/res/bower-libs/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>
<script type="text/javascript" src="http://static.blog.csdn.net/scripts/web-storage-cache.min.js"></script>
<script type="text/javascript" src="http://static.blog.csdn.net/scripts/replace.min.js"></script>




  <script type="text/ecmascript">
      window.quickReplyflag = true;
           
            var isBole = false;
            
          
    </script>
<div id="article_details" class="details">
    <div class="article_title">   
         <span class="ico ico_type_Repost"></span>


    <h1>
        <span class="link_title"><a href="/wangxingwu_314/article/details/8060312">
        Android中的AlarmManager的使用            
        </a></span>
    </h1>
</div>

   

        <div class="article_manage clearfix">
        <div class="article_l">
            <span class="link_categories">
            标签：
              <a href='http://www.csdn.net/tag/android' target=_blank onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_tag']);">android</a><a href='http://www.csdn.net/tag/action' target=_blank onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_tag']);">action</a><a href='http://www.csdn.net/tag/service' target=_blank onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_tag']);">service</a><a href='http://www.csdn.net/tag/calendar' target=_blank onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_tag']);">calendar</a><a href='http://www.csdn.net/tag/class' target=_blank onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_tag']);">class</a><a href='http://www.csdn.net/tag/html' target=_blank onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_tag']);">html</a>
            </span>
        </div>
        <div class="article_r">
            <span class="link_postdate">2012-10-11 14:22</span>
            <span class="link_view" title="阅读次数">40729人阅读</span>
            <span class="link_comments" title="评论次数"> <a href="#comments" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_pinglun'])">评论</a>(7)</span>
            <span class="link_collect tracking-ad" data-mod="popu_171"> <a href="javascript:void(0);" onclick="javascript:collectArticle('Android中的AlarmManager的使用','8060312');return false;" title="收藏">收藏</a></span>
             <span class="link_report"> <a href="#report" onclick="javascript:report(8060312,2);return false;" title="举报">举报</a></span>

        </div>
    </div>
    <div class="embody"  style="display:none" id="embody">
        <span class="embody_t">本文章已收录于：</span>
        <div class="embody_c" id="lib" value="{&quot;err&quot;:0,&quot;msg&quot;:&quot;ok&quot;,&quot;data&quot;:[]}"></div>
    </div>
    <style type="text/css">        
            .embody{
                padding:10px 10px 10px;
                margin:0 -20px;
                border-bottom:solid 1px #ededed;                
            }
            .embody_b{
                margin:0 ;
                padding:10px 0;
            }
            .embody .embody_t,.embody .embody_c{
                display: inline-block;
                margin-right:10px;
            }
            .embody_t{
                font-size: 12px;
                color:#999;
            }
            .embody_c{
                font-size: 12px;
            }
            .embody_c img,.embody_c em{
                display: inline-block;
                vertical-align: middle;               
            }
             .embody_c img{               
                width:30px;
                height:30px;
            }
            .embody_c em{
                margin: 0 20px 0 10px;
                color:#333;
                font-style: normal;
            }
    </style>
    <script  type="text/javascript">
        $(function () {
            try
            {
                var lib = eval("("+$("#lib").attr("value")+")");
                var html = "";
                if (lib.err == 0) {
                    $.each(lib.data, function (i) {
                        var obj = lib.data[i];
                        //html += '<img src="' + obj.logo + '"/>' + obj.name + "&nbsp;&nbsp;";
                        html += ' <a href="' + obj.url + '" target="_blank">';
                        html += ' <img src="' + obj.logo + '">';
                        html += ' <em><b>' + obj.name + '</b></em>';
                        html += ' </a>';
                    });
                    if (html != "") {
                        setTimeout(function () {
                            $("#lib").html(html);                      
                            $("#embody").show();
                        }, 100);
                    }
                }      
            } catch (err)
            { }
            
        });
    </script>
    <script   type="text/javascript" src="http://static.blog.csdn.net/scripts/category.js"></script>  

  

  
  
     

<div id="article_content" class="article_content">

<p>1、AlarmManager，顾名思义，就是“提醒”，是Android中常用的<span style="color:#0000cc">一种系统级别的提示服务</span>，在特定的时刻为我们广播一个指定的Intent。简单的说就是我们设定一个时间，然后在该时间到来时，AlarmManager为我们广播一个我们设定的Intent,通常我们使用 PendingIntent，PendingIntent可以理解为Intent的封装包，简单的说就是在Intent上在加个指定的动作。在使用Intent的时候，我们还需要在执行startActivity、startService或sendBroadcast才能使Intent有用。而PendingIntent的话就是将这个动作包含在内了。</p>
<p>定义一个PendingIntent对象。<br>
<span style="font-size:14px; color:#0000ff">PendingIntent pi = PendingIntent.getBroadcast(this,0,intent,0);</span></p>
<p>2、AlarmManager的常用方法有三个：</p>
<p>（1）set(int type，long startTime，PendingIntent pi)；</p>
<p>该方法用于设置一次性闹钟，第一个参数表示闹钟类型，第二个参数表示闹钟执行时间，第三个参数表示闹钟响应动作。</p>
<p>（2）setRepeating(int type，long startTime，long intervalTime，PendingIntent pi)；</p>
<p>该方法用于设置重复闹钟，第一个参数表示闹钟类型，第二个参数表示闹钟首次执行时间，第三个参数表示闹钟两次执行的间隔时间，第三个参数表示闹钟响应动作。</p>
<p>（3）setInexactRepeating（int type，long startTime，long intervalTime，PendingIntent pi）；</p>
<p>该方法也用于设置重复闹钟，与第二个方法相&#20284;，不过其两个闹钟执行的间隔时间不是固定的而已。</p>
<p>3、三个方法各个参数详悉：</p>
<p>（1）int type： 闹钟的类型，常用的有5个&#20540;：AlarmManager.ELAPSED_REALTIME、 AlarmManager.ELAPSED_REALTIME_WAKEUP、AlarmManager.RTC、 AlarmManager.RTC_WAKEUP、AlarmManager.POWER_OFF_WAKEUP。</p>
<p>AlarmManager.ELAPSED_REALTIME表示闹钟在手机睡眠状态下不可用，该状态下闹钟使用相对时间（相对于系统启动开始），状态&#20540;为3；</p>
<p>AlarmManager.ELAPSED_REALTIME_WAKEUP表示闹钟在睡眠状态下会唤醒系统并执行提示功能，该状态下闹钟也使用相对时间，状态&#20540;为2；</p>
<p>AlarmManager.RTC表示闹钟在睡眠状态下不可用，该状态下闹钟使用绝对时间，即当前系统时间，状态&#20540;为1；</p>
<p>AlarmManager.RTC_WAKEUP表示闹钟在睡眠状态下会唤醒系统并执行提示功能，该状态下闹钟使用绝对时间，状态&#20540;为0；</p>
<p>AlarmManager.POWER_OFF_WAKEUP表示闹钟在手机关机状态下也能正常进行提示功能，所以是5个状态中用的最多的状态之一，该状态下闹钟也是用绝对时间，状态&#20540;为4；不过本状态好像受SDK版本影响，某些版本并不支持；</p>
<p>（2）long startTime： 闹钟的第一次执行时间，以毫秒为单位，可以自定义时间，不过一般使用当前时间。需要注意的是，本属性与第一个属性（type）密切相关，如果第一个参数对 应的闹钟使用的是相对时间（ELAPSED_REALTIME和ELAPSED_REALTIME_WAKEUP），那么本属性就得使用相对时间（相对于 系统启动时间来说），比如当前时间就表示为：SystemClock.elapsedRealtime()；如果第一个参数对应的闹钟使用的是绝对时间 （RTC、RTC_WAKEUP、POWER_OFF_WAKEUP），那么本属性就得使用绝对时间，比如当前时间就表示
 为：System.currentTimeMillis()。</p>
<p>（3）long intervalTime：对于后两个方法来说，存在本属性，表示两次闹钟执行的间隔时间，也是以毫秒为单位。</p>
<p>（4）PendingIntent pi： 绑定了闹钟的执行动作，比如发送一个广播、给出提示等等。PendingIntent是Intent的封装类。需要注意的是，如果是通过启动服务来实现闹钟提 示的话，PendingIntent对象的获取就应该采用Pending.getService(Context c,int i,Intent intent,int j)方法；如果是通过广播来实现闹钟提示的话，PendingIntent对象的获取就应该采用 PendingIntent.getBroadcast(Context
 c,int i,Intent intent,int j)方法；如果是采用Activity的方式来实现闹钟提示的话，PendingIntent对象的获取就应该采用 PendingIntent.getActivity(Context c,int i,Intent intent,int j)方法。如果这三种方法错用了的话，虽然不会报错，但是看不到闹钟提示效果。</p>
<p>4.举例说明：定义一个闹钟，5秒钟重复响应。</p>
<p>（1）MainActivity，在onCreate中完成：</p>
<p></p>
<div class="dp-highlighter bg_java">
<div class="bar">
<div class="tools"><strong>[java]</strong> <a class="ViewSource" title="view plain" href="http://blog.csdn.net/elitor/article/details/7613985#">
view plain</a><a class="CopyToClipboard" title="copy" href="http://blog.csdn.net/elitor/article/details/7613985#">copy</a><a class="PrintSource" title="print" href="http://blog.csdn.net/elitor/article/details/7613985#">print</a><a class="About" title="?" href="http://blog.csdn.net/elitor/article/details/7613985#">?</a></div>
</div>
<ol class="dp-j">
<li class="alt"><span><span class="comment">//创建Intent对象，action为ELITOR_CLOCK，附加信息为字符串“你该打酱油了”</span><span>&nbsp;&nbsp;</span></span></li><li><span>Intent&nbsp;intent&nbsp;=&nbsp;</span><span class="keyword">new</span><span>&nbsp;Intent(</span><span class="string">&quot;ELITOR_CLOCK&quot;</span><span>);&nbsp;&nbsp;</span></li><li class="alt"><span>intent.putExtra(</span><span class="string">&quot;msg&quot;</span><span>,</span><span class="string">&quot;你该打酱油了&quot;</span><span>);&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;</span></li><li class="alt"><span></span><span class="comment">//定义一个PendingIntent对象，PendingIntent.getBroadcast包含了sendBroadcast的动作。</span><span>&nbsp;&nbsp;</span></li><li><span></span><span class="comment">//也就是发送了action&nbsp;为&quot;ELITOR_CLOCK&quot;的intent </span>
<span>&nbsp;&nbsp;</span></li><li class="alt"><span>PendingIntent&nbsp;pi&nbsp;=&nbsp;PendingIntent.getBroadcast(</span><span class="keyword">this</span><span>,</span><span class="number">0</span><span>,intent,</span><span class="number">0</span><span>);&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;</span></li><li class="alt"><span></span><span class="comment">//AlarmManager对象,注意这里并不是new一个对象，Alarmmanager为系统级服务</span><span>&nbsp;&nbsp;</span></li><li><span>AlarmManager&nbsp;am&nbsp;=&nbsp;(AlarmManager)getSystemService(ALARM_SERVICE);&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li><span></span><span class="comment">//设置闹钟从当前时间开始，每隔5s执行一次PendingIntent对象pi，注意第一个参数与第二个参数的关系</span><span>&nbsp;&nbsp;</span></li><li class="alt"><span></span><span class="comment">//&nbsp;5秒后通过PendingIntent&nbsp;pi对象发送广播</span><span>&nbsp;&nbsp;</span></li><li><span>am.setRepeating(AlarmManager.RTC_WAKEUP,System.currentTimeMillis(),</span><span class="number">5</span><span>*</span><span class="number">1000</span><span>,pi);&nbsp;&nbsp;</span></li></ol>
</div>
<pre class="java" style="DISPLAY: none" name="code">//创建Intent对象，action为ELITOR_CLOCK，附加信息为字符串“你该打酱油了”
Intent intent = new Intent(&quot;ELITOR_CLOCK&quot;);
intent.putExtra(&quot;msg&quot;,&quot;你该打酱油了&quot;);  

//定义一个PendingIntent对象，PendingIntent.getBroadcast包含了sendBroadcast的动作。
//也就是发送了action 为&quot;ELITOR_CLOCK&quot;的intent
PendingIntent pi = PendingIntent.getBroadcast(this,0,intent,0);  

//AlarmManager对象,注意这里并不是new一个对象，Alarmmanager为系统级服务
AlarmManager am = (AlarmManager)getSystemService(ALARM_SERVICE);  

//设置闹钟从当前时间开始，每隔5s执行一次PendingIntent对象pi，注意第一个参数与第二个参数的关系
// 5秒后通过PendingIntent pi对象发送广播
am.setRepeating(AlarmManager.RTC_WAKEUP,System.currentTimeMillis(),5*1000,pi);</pre><br>
<p></p>
<p>那么启动MainActivity之后，由于定义了AlarmManager am，并且调用了am.setRepeating(...)函数,则系统每隔5s将会通过pi启动intent发送广播，其action为ELITOR_CLOCK。所以我们需要在Manifest.xml中注册一个receiver,同时自己定义一个广播接收器类。</p>
<p>(2)定义一个广播接收器类MyReceiver，重写onReceive()函数。</p>
<p></p>
<div class="dp-highlighter bg_java">
<div class="bar">
<div class="tools"><strong>[java]</strong> <a class="ViewSource" title="view plain" href="http://blog.csdn.net/elitor/article/details/7613985#">
view plain</a><a class="CopyToClipboard" title="copy" href="http://blog.csdn.net/elitor/article/details/7613985#">copy</a><a class="PrintSource" title="print" href="http://blog.csdn.net/elitor/article/details/7613985#">print</a><a class="About" title="?" href="http://blog.csdn.net/elitor/article/details/7613985#">?</a></div>
</div>
<ol class="dp-j">
<li class="alt"><span><span class="keyword">public</span><span>&nbsp;</span><span class="keyword">class</span><span>&nbsp;MyReceiver&nbsp;</span><span class="keyword">extends</span><span>&nbsp;BroadcastReceiver&nbsp;&nbsp;</span></span></li><li><span>{&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="annotation">@Override</span><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword">public</span><span>&nbsp;</span><span class="keyword">void</span><span>&nbsp;onReceive(Context&nbsp;context,&nbsp;Intent&nbsp;intent)&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment">//&nbsp;TODO&nbsp;Auto-generated&nbsp;method&nbsp;stub</span><span>&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Log.d(</span><span class="string">&quot;MyTag&quot;</span><span>,&nbsp;</span><span class="string">&quot;onclock......................&quot;</span><span>);&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String&nbsp;msg&nbsp;=&nbsp;intent.getStringExtra(</span><span class="string">&quot;msg&quot;</span><span>);&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Toast.makeText(context,msg,Toast.LENGTH_SHORT).show();&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;</span></li><li class="alt"><span>}&nbsp;&nbsp;</span></li></ol>
</div>
<pre class="java" style="DISPLAY: none" name="code">public class MyReceiver extends BroadcastReceiver
{

	@Override
	public void onReceive(Context context, Intent intent)
	{
		// TODO Auto-generated method stub
		Log.d(&quot;MyTag&quot;, &quot;onclock......................&quot;);
		String msg = intent.getStringExtra(&quot;msg&quot;);
		Toast.makeText(context,msg,Toast.LENGTH_SHORT).show();
	}

}</pre><br>
<br>
<p></p>
<p>（3）在Manifest.xml中注册广播接收器：</p>
<p></p>
<div class="dp-highlighter bg_html">
<div class="bar">
<div class="tools"><strong>[html]</strong> <a class="ViewSource" title="view plain" href="http://blog.csdn.net/elitor/article/details/7613985#">
view plain</a><a class="CopyToClipboard" title="copy" href="http://blog.csdn.net/elitor/article/details/7613985#">copy</a><a class="PrintSource" title="print" href="http://blog.csdn.net/elitor/article/details/7613985#">print</a><a class="About" title="?" href="http://blog.csdn.net/elitor/article/details/7613985#">?</a></div>
</div>
<ol class="dp-xml">
<li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">receiver</span><span>&nbsp;</span><span class="attribute">android:name</span><span>=</span><span class="attribute-value">&quot;.MyReceiver&quot;</span><span class="tag">&gt;</span><span>&nbsp;&nbsp;</span></span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="tag">&lt;</span><span class="tag-name">intent-filter</span><span class="tag">&gt;</span><span>&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="tag">&lt;</span><span class="tag-name">action</span><span>&nbsp;</span><span class="attribute">android:name</span><span>=</span><span class="attribute-value">&quot;ELITOR_CLOCK&quot;</span><span>&nbsp;</span><span class="tag">/&gt;</span><span>&nbsp;&nbsp;</span></li><li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="tag">&lt;/</span><span class="tag-name">intent-filter</span><span class="tag">&gt;</span><span>&nbsp;&nbsp;</span></li><li class="alt"><span></span><span class="tag">&lt;/</span><span class="tag-name">receiver</span><span class="tag">&gt;</span><span>&nbsp;&nbsp;</span></li></ol>
</div>
<pre class="html" style="DISPLAY: none" name="code">&lt;receiver android:name=&quot;.MyReceiver&quot;&gt;
       	&lt;intent-filter&gt;
          	&lt;action android:name=&quot;ELITOR_CLOCK&quot; /&gt;
       	&lt;/intent-filter&gt;
&lt;/receiver&gt;</pre><br>
<p></p>
<p><br>
</p>
<p><img alt="" src="http://my.csdn.net/uploads/201205/29/1338293433_7136.png"><img alt="" src="http://my.csdn.net/uploads/201205/29/1338293440_6753.png"></p>
<p>&nbsp;</p>
<p>补充：设置指定的时间启动广播。</p>
<div class="tools"><strong>[html]</strong> <a class="ViewSource" title="view plain" href="http://blog.csdn.net/elitor/article/details/7613985#">
view plain</a><a class="CopyToClipboard" title="copy" href="http://blog.csdn.net/elitor/article/details/7613985#">copy</a><a class="PrintSource" title="print" href="http://blog.csdn.net/elitor/article/details/7613985#">print</a><a class="About" title="?" href="http://blog.csdn.net/elitor/article/details/7613985#">?</a></div>
<p>import java.util.Calendar;</p>
<p>import android.app.Activity;<br>
import android.app.AlarmManager;<br>
import android.app.PendingIntent;<br>
import android.content.Intent;<br>
import android.os.Bundle;</p>
<p>public class AlarmActivity extends Activity {<br>
/** Called when the activity is first created. */<br>
@Override<br>
public void onCreate(Bundle savedInstanceState) {<br>
super.onCreate(savedInstanceState);<br>
setContentView(R.layout.main);<br>
Calendar c=Calendar.getInstance();</p>
<p>c.set(Calendar.YEAR,2011);<br>
c.set(Calendar.MONTH,Calendar.JUNE);//也可以填数字，0-11,一月为0<br>
c.set(Calendar.DAY_OF_MONTH, 28);<br>
c.set(Calendar.HOUR_OF_DAY, 19);<br>
c.set(Calendar.MINUTE, 50);<br>
c.set(Calendar.SECOND, 0);<br>
//设定时间为 2011年6月28日19点50分0秒<br>
//c.set(2011, 05,28, 19,50, 0);<br>
//也可以写在一行里</p>
<p>Intent intent=new Intent(this,AlarmReceiver.class);<br>
PendingIntent pi=PendingIntent.getBroadcast(this, 0, intent,0);<br>
//设置一个PendingIntent对象，发送广播<br>
AlarmManager am=(AlarmManager)getSystemService(ALARM_SERVICE);<br>
//获取AlarmManager对象<br>
am.set(AlarmManager.RTC_WAKEUP, c.getTimeInMillis(), pi);</p>
<p>//时间到时，执行PendingIntent，只执行一次<br>
//AlarmManager.RTC_WAKEUP休眠时会运行，如果是AlarmManager.RTC,在休眠时不会运行<br>
//am.setRepeating(AlarmManager.RTC_WAKEUP, c.getTimeInMillis(), 10000, pi);<br>
//如果需要重复执行，使用上面一行的setRepeating方法，倒数第二参数为间隔时间,单位为毫秒</p>
<p>}<br>
} </p>
<p><br>
&nbsp;</p>
   
</div>




<!-- Baidu Button BEGIN -->




<div class="bdsharebuttonbox tracking-ad" style="float: right;" data-mod="popu_172">
<a href="#" class="bds_more" data-cmd="more" style="background-position:0 0 !important; background-image: url(http://bdimg.share.baidu.com/static/api/img/share/icons_0_16.png?v=d754dcc0.png) !important"></a>
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"  style="background-position:0 -52px !important"></a>
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"style="background-position:0 -104px !important"></a>
<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"style="background-position:0 -260px !important"></a>
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"style="background-position:0 -208px !important"></a>
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"style="background-position:0 -1612px !important" ></a>
</div>
<script>window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "1", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "16" }, "share": {} }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];</script>
<!-- Baidu Button END -->

   <link rel="stylesheet" href="http://static.blog.csdn.net/css/blog_detail.css" />

    
<!--172.16.140.13-->

<!-- Baidu Button BEGIN -->
<script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=1536434" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
    document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
</script>
<!-- Baidu Button END -->

 

        <div id="digg" ArticleId="8060312" >
            <dl id="btnDigg" class="digg digg_disable"  onclick="btndigga();">
               
                 <dt>顶</dt>
                <dd>11</dd>
            </dl>
           
              
            <dl id="btnBury" class="digg digg_disable"  onclick="btnburya();">
              
                  <dt>踩</dt>
                <dd>1</dd>               
            </dl>
            
        </div>
     <div class="tracking-ad" data-mod="popu_222"><a href="javascript:void(0);" >&nbsp;</a>   </div>
    <div class="tracking-ad" data-mod="popu_223"> <a href="javascript:void(0);" >&nbsp;</a></div>
    <script type="text/javascript">
                function btndigga() {
                    $(".tracking-ad[data-mod='popu_222'] a").click();
                }
                function btnburya() {
                    $(".tracking-ad[data-mod='popu_223'] a").click();
                }
            </script>

   <ul class="article_next_prev">
                <li class="next_article"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_xiayipian']);location.href='/wangxingwu_314/article/details/8078105';">下一篇</span><a href="/wangxingwu_314/article/details/8078105" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_xiayipian'])">类似于选择城市相同的首字母放在一起的效果</a></li>
    </ul>

    <div style="clear:both; height:10px;"></div>


      
</div>
<div id="suggest"></div>
         <script  language="javascript" type='text/javascript'>     
             $(function(){
                 $.get("/wangxingwu_314/svc/GetSuggestContent/8060312",function(data){
                     $("#suggest").html(data);
                 });     
             });             
         </script>  


<style>
.blog-ass-articl dd {
color: #369;
width: 99%; /*修改行*/
float: left;
overflow: hidden;
font: normal normal 12px/23px "SimSun";
height: 23px;
margin: 0;
padding: 0 0 0 10px;
margin-right: 30px;
background: url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;
}
</style>

 <link rel="stylesheet" href="http://static.blog.csdn.net/css/replace.css"/>
<div id="relate" data-mod="popu_218"  class="tracking-ad">
        <div class="relate_t">
            <h3><span>参考知识库</span></h3>
        </div>
        <div class="relate_c">
        </div>
</div>
 

<dl class="blog-ass-articl" id="res-relatived" > 
    <div class="embody embody_b" id="libkeyparent"  style="display:none">
            <span class="embody_t">更多资料请参考：</span>
            <div class="embody_c" id="libkey"></div>
    </div>


     <dt><span>猜你在找</span></dt>    


   


    <div id="adCollege" style="width: 42%;float: left;"> 
        <script src="http://csdnimg.cn/jobreco/job_reco.js" type="text/javascript"></script> 
        <script type="text/javascript">
            csdn.position.showEdu({
                sourceType: "blog",
                searchType: "detail",
                searchKey: "8060312",
                username: "",
                recordcount: "5",
                containerId: "adCollege" //容器DIV的id。 
            });
        </script> 
    </div>  

    
     <div id="res"  data-mod="popu_36"  class="tracking-ad" style="width: 42%;float: left;margin-right: 30px;"></div>
   
</dl>


<script type="text/javascript">
    $(function () {
        setTimeout(function () {
            var searchtitletags = 'Android中的AlarmManager的使用' + ',' + $("#tags").html();
            searchService({
                index: 'blog',
                query: searchtitletags,
                from: 5,
                size: 5,
                appendTo: '#res',
                url: 'recommend',
                his: 2,
                client: "blog_cf_enhance",
                tmpl: '<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px;"><a href="#{ url }" title="#{ title }" strategy="#{ strategy }">#{ title }</a></dd>'
            });
        }, 500);
    });    

 </script>  

    <div id="ad_cen">        
                    <script type="text/javascript">
                        /*博客内容页下方Banner-728*90，创建于2014-7-3*/
                        var cpro_id = "u1607657";
                    </script>
                    <script type="text/javascript" src="http://cpro.baidustatic.com/cpro/ui/c.js"></script>
    </div>  

<div class="comment_class">
    <div id="comment_title" class="panel_head">
        <span class="see_comment">查看评论</span><a name="comments"></a></div>
    <div id="comment_list">
    </div>
    <div id="comment_bar">
    </div>
    <div id="comment_form">
    </div>
    <div class="announce">
        * 以上用户言论只代表其个人观点，不代表CSDN网站的观点或立场<a name="reply"></a><a name="quote"></a></div>
</div>

<script type="text/javascript">
    var fileName = '8060312';
    var commentscount = 7;
    var islock = false
</script>
<script type="text/javascript" src="http://static.blog.csdn.net/scripts/comment.js"></script>
    <div id="ad_bot">
    </div>
<div id="report_dialog">
</div>

<div id="d-top"  style="bottom:60px;">
        <a id="quick-reply" class="btn btn-top q-reply" title="快速回复" style="display:none;">
            <img src="http://static.blog.csdn.net/images/blog-icon-reply.png" alt="快速回复">
        </a>    

    <a id="d-top-a" class="btn btn-top backtop"  style="display: none;" title="返回顶部" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_huidaodingbu'])" style="">         
         <img src="http://static.blog.csdn.net/images/top.png" alt="TOP">
    </a>
</div>
<script type="text/javascript">
    $(function ()
    {
        $("#ad_frm_0").height("90px");
        
        setTimeout(function(){
            $("#ad_frm_2").height("200px");
        },1000);    
    });
  
</script>
<style type="text/css">
    .tag_list
    {
        background: none repeat scroll 0 0 #FFFFFF;
        border: 1px solid #D7CBC1;
        color: #000000;
        font-size: 12px;
        line-height: 20px;
        list-style: none outside none;
        margin: 10px 2% 0 1%;
        padding: 1px;
    }
    .tag_list h5
    {
        background: none repeat scroll 0 0 #E0DBD3;
        color: #47381C;
        font-size: 12px;
        height: 24px;
        line-height: 24px;
        padding: 0 5px;
        margin: 0;
    }
    .tag_list h5 a
    {
        color: #47381C;
    }
    .classify
    {
        margin: 10px 0;
        padding: 4px 12px 8px;
    }
    .classify a
    {
        margin-right: 20px;
        white-space: nowrap;
    }
</style>


<div class="tag_list" style="display:none"></div>
  <script  language="javascript" type='text/javascript'>     
      $(function(){
              setTimeout(function(){
                  $.get("/wangxingwu_314/svc/GetTagContent",function(data){
                      $(".tag_list").html(data).show();
                  });     
              });
          },500);                       
 </script> 


<div id="pop_win" style="display:none ;position: absolute; z-index: 10000; border: 1px solid rgb(220, 220, 220); top: 222.5px; left: 630px; opacity: 1; background: none 0px 0px repeat scroll rgb(255, 255, 255);">
    
</div>
<div id="popup_mask"></div>
<style>
    #popup_mask
    {
        position: absolute;
        width: 100%;
        height: 100%;
        background: #000;
        z-index: 9999;
        left: 0px;
        top: 0px;
        opacity: 0.3;
        filter: alpha(opacity=30);
        display: none;
    }

</style>




<script type="text/javascript">
    $(function(){
        setTimeout(function(){
            $(".comment_body:contains('回复')").each(function(index,item){
                var u=$(this).text().split('：')[0].toString().replace("回复","")
                var thisComment=$(this);
                if(u)
                {
                    $.getJSON("https://passport.csdn.net/get/nick?callback=?", {users: u}, function(a) {
                        if(a!=null&&a.data!=null&&a.data.length>0)
                        {
                            nick=a.data[0].n; 
                            if(u!=nick)
                            {
                                thisComment.text(thisComment.text().replace(u,nick));  
                            }
                        }       
                    });  
                }
            });         

        },200);  

        setTimeout(function(){
            $(".math").each(function(index,value){$(this).find("span").last().css("color","#fff"); })
        },5000);

        setTimeout(function(){
            $(".math").each(function(index,value){$(this).find("span").last().css("color","#fff"); })
        },10000);

        setTimeout(function(){
            $(".math").each(function(index,value){$(this).find("span").last().css("color","#fff"); })
        },15000);
        
        setTimeout(function(){
            $("a img[src='http://js.tongji.linezing.com/stats.gif']").parent().css({"position":"absolute","left":"50%"});
        },300);
    });

    function loginbox(){
        var $logpop=$("#pop_win");
        $logpop.html('<iframe src="https://passport.csdn.net/account/loginbox?service=http://static.blog.csdn.net/callback.htm" frameborder="0" height="600" width="400" scrolling="no"></iframe>');

        $('#popup_mask').css({
            opacity: 0.5,
            width: $( document ).width() + 'px',
            height:  $( document ).height() + 'px'
        });
        $('#popup_mask').css("display","block");
 
        $logpop.css( {
            top: ($( window ).height() - $logpop.height())/ 2  + $( window 
       ).scrollTop() + 'px',
            left:($( window ).width() - $logpop.width())/ 2
        } );
 
        setTimeout( function () {
            $logpop.show();
            $logpop.css( {
                opacity: 1
            } );
        }, 200 );
 
        $('#popup_mask').unbind("click");
        $('#popup_mask').bind("click", function(){
            $('#popup_mask').hide();
            var $clopop = $("#pop_win");
            $("#common_ask_div_sc").css("display","none");
            $clopop.css( {
                opacity: 0
            } );
            setTimeout( function () {
                $clopop.hide();
            }, 350 );
            return false;
        });
    }   

</script>
 <script language="javascript" type="text/javascript" src="http://ads.csdn.net/js/async_new.js"></script>      


                        <div class="clear">
                        </div>
                    </div>                   
                
            </div>
                   
           <div id="side">
               
    <div class="side">
<div id="panel_Profile" class="panel">
<ul class="panel_head"><span>个人资料</span></ul>
<ul class="panel_body profile">
<div id="blog_userface">
    <a href="http://my.csdn.net/wangxingwu_314" target="_blank">
    <img src="http://avatar.csdn.net/F/3/6/1_wangxingwu_314.jpg" title="访问我的空间" style="max-width:90%"/>
    </a>
    <br />
    <span><a href="http://my.csdn.net/wangxingwu_314" class="user_name" target="_blank">wangxingwu_314</a></span>
</div>
<div class="interact">

    <a href="javascript:void(0);" class="attent" id="span_add_follow" title="[加关注]"></a>

 <a href="javascript:void(0);" class="letter"  title="[发私信]" onclick="window.open('http://msg.csdn.net/letters/model?receiver=wangxingwu_314','_blank','height=350,width=700');_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_sixin'])"></a>  
</div>
<div id="blog_medal">
                <div id="bms_box">
               </div>
</div>
<ul id="blog_rank">
    <li>访问：<span>45606次</span></li>
    <li>积分：<span>228</span> </li>    
    <li >等级： <span style="position:relative;display:inline-block;z-index:1" >
            <img src="http://c.csdnimg.cn/jifen/images/xunzhang/jianzhang/blog2.png" alt="" style="vertical-align: middle;" id="leveImg">
            <div id="smallTittle" style=" position: absolute;  left: -24px;  top: 25px;  text-align: center;  width: 101px;  height: 32px;  background-color: #fff;  line-height: 32px;  border: 2px #DDDDDD solid;  box-shadow: 0px 2px 2px rgba (0,0,0,0.1);  display: none;   z-index: 999;">
            <div style="left: 42%;  top: -8px;  position: absolute;  width: 0;  height: 0;  border-left: 10px solid transparent;  border-right: 10px solid transparent;  border-bottom: 8px solid #EAEAEA;"></div>
            积分：228 </div>
        </span>  </li>
    <li>排名：<span>千里之外</span></li>
</ul>
<ul id="blog_statistics">
    <li>原创：<span>7篇</span></li>
    <li>转载：<span>2篇</span></li>
    <li>译文：<span>0篇</span></li>
    <li>评论：<span>7条</span></li>
</ul>
</ul>
</div>


<div class="panel" id="panel_Search">
    <ul class="panel_head"><span>文章搜索</span></ul>
    <ul class="panel_body">
        <form id="frmSearch" action="http://so.csdn.net/search" class="form_search" target="_blank">
        <span><input id="inputSearch" type="text" class="blogsearch" title="请输入关键字" /></span>
        <input id="btnSubmit" type="button" value="搜索" title="search in blog" />
        <input type="hidden" name="q" id="inputQ" />
        <input type="hidden" name="t" value="blog" />
        <a id="btnSearchBlog" target="_blank"></a>
        </form>
    </ul>
</div>

<script type="text/javascript">
    $(function () {
        $("#btnSubmit").click(function () {           
            search();
        });

        $("#frmSearch").submit(function () {
            search();
            return false;
        });

        function search()
        {
            var url = "http://so.csdn.net/so/search/s.do?q=" + encodeURIComponent($("#inputSearch").val()) + "&u=" + username + "&t=blog";
            window.location.href = url;
        }   
    });
</script><div id="panel_Category" class="panel">
<ul class="panel_head"><span>文章分类</span></ul>
<ul class="panel_body">    
                 <li>
                    <a href="/wangxingwu_314/article/category/1258517" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">Android应用开发</a><span>(7)</span>
                </li>
</ul>
</div><div id="panel_Archive" class="panel">
<ul class="panel_head"><span>文章存档</span></ul>
<ul class="panel_body">
<div id="archive_list">
<!--归档统计-->
<li><a href="/wangxingwu_314/article/month/2016/05">2016年05月</a><span>(1)</span></li><li><a href="/wangxingwu_314/article/month/2013/04">2013年04月</a><span>(1)</span></li><li><a href="/wangxingwu_314/article/month/2012/11">2012年11月</a><span>(4)</span></li><li><a href="/wangxingwu_314/article/month/2012/10">2012年10月</a><span>(3)</span></li>
</div>
</ul>
</div>
<div id="hotarticls" class="panel">
<ul class="panel_head">
    <span>       
阅读排行    </span>
</ul>

<ul class="panel_body itemlist">
<li>
<a href="/wangxingwu_314/article/details/8060312" title="Android中的AlarmManager的使用">Android中的AlarmManager的使用</a><span>(40723)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8166496" title="Android Selector的实现原理">Android Selector的实现原理</a><span>(1267)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8078105" title="类似于选择城市相同的首字母放在一起的效果">类似于选择城市相同的首字母放在一起的效果</a><span>(599)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8794124" title="Android AppWidget开发心得">Android AppWidget开发心得</a><span>(453)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8181818" title="Android自定义属性,attr format取值类型">Android自定义属性,attr format取值类型</a><span>(271)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8098442" title="GIT的使用">GIT的使用</a><span>(255)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8191894" title="Android中的部分笔记">Android中的部分笔记</a><span>(249)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8181742" title="SimpleDateFormat的方法使用">SimpleDateFormat的方法使用</a><span>(224)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/51434234" title="实现QQ空间评论列表样式">实现QQ空间评论列表样式</a><span>(149)</span>
</li>
</ul>
</div>
<div id="hotarticls2" class="panel">
<ul class="panel_head"><span>评论排行</span></ul>
<ul class="panel_body itemlist">
<li>
<a href="/wangxingwu_314/article/details/8060312" title="Android中的AlarmManager的使用">Android中的AlarmManager的使用</a><span>(7)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8078105" title="类似于选择城市相同的首字母放在一起的效果">类似于选择城市相同的首字母放在一起的效果</a><span>(0)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8098442" title="GIT的使用">GIT的使用</a><span>(0)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8166496" title="Android Selector的实现原理">Android Selector的实现原理</a><span>(0)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8181742" title="SimpleDateFormat的方法使用">SimpleDateFormat的方法使用</a><span>(0)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8181818" title="Android自定义属性,attr format取值类型">Android自定义属性,attr format取值类型</a><span>(0)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8191894" title="Android中的部分笔记">Android中的部分笔记</a><span>(0)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/8794124" title="Android AppWidget开发心得">Android AppWidget开发心得</a><span>(0)</span>
</li>
<li>
<a href="/wangxingwu_314/article/details/51434234" title="实现QQ空间评论列表样式">实现QQ空间评论列表样式</a><span>(0)</span>
</li>
</ul>
</div>
<div id="homepageArticles" class="panel tracking-ad" data-mod="popu_4">
<ul class="panel_head"><span>推荐文章</span></ul>
<ul class="panel_body" id="ad_commend">
<ul>
<li><a href="http://blog.csdn.net/yyh352091626/article/details/53304728" target="_blank">* RxJava详解，由浅入深</a></li>
<li><a href="http://blog.csdn.net/foruok/article/details/53063089" 
target="_blank">* 倍升工作效率的小策略</a></li>
<li><a href="http://blog.csdn.net/jiangwei0910410003/article/details/53099390" 
target="_blank">* Android热修复框架AndFix原理解析及使用</a></li>
<li><a href="http://blog.csdn.net/xiangzhihong8/article/details/53312278" target="_blank">* “区块链”究竟是什么鬼</a></li>
<li><a href="http://blog.csdn.net/yinwenjie/article/details/53033017" 
target="_blank">* 架构设计：系统存储-MySQL主从方案业务连接透明化（中）</a></li>


</ul></ul>
</div>


<div id="newcomments" class="panel">
<ul class="panel_head"><span>最新评论</span></ul>
<ul class="panel_body itemlist">
    <li>
   
         <a href="/wangxingwu_314/article/details/8060312#comments">Android中的AlarmManager的使用</a>
    <p style="margin:0px;"><a href="/u010032372" class="user_name">u010032372</a>:
2016-8-1 学习
    </p>
    </li>
    <li>
   
         <a href="/wangxingwu_314/article/details/8060312#comments">Android中的AlarmManager的使用</a>
    <p style="margin:0px;"><a href="/iiChrome" class="user_name">iiChrome</a>:
@a1030260075:大哥，你能不能不要这么逗。不是PendingIntent.getActiv...
    </p>
    </li>
    <li>
   
         <a href="/wangxingwu_314/article/details/8060312#comments">Android中的AlarmManager的使用</a>
    <p style="margin:0px;"><a href="/a1030260075" class="user_name">a1030260075</a>:
你好，写的很详细，但是有一个地方有问题吧你都说了activity中应该使用PendingIntent...
    </p>
    </li>
    <li>
   
         <a href="/wangxingwu_314/article/details/8060312#comments">Android中的AlarmManager的使用</a>
    <p style="margin:0px;"><a href="/moonlehehe" class="user_name">moonlehehe</a>:
PendingIntent对象的获取就采用Pending.getService(Context c,...
    </p>
    </li>
    <li>
   
         <a href="/wangxingwu_314/article/details/8060312#comments">Android中的AlarmManager的使用</a>
    <p style="margin:0px;"><a href="/FansUnion" class="user_name">FansUnion</a>:
写得不错啊
    </p>
    </li>
    <li>
   
         <a href="/wangxingwu_314/article/details/8060312#comments">Android中的AlarmManager的使用</a>
    <p style="margin:0px;"><a href="/TuRanLeiLiao" class="user_name">TuRanLeiLiao</a>:
看到你该打酱油了我就笑了，，我是不是太无聊了
    </p>
    </li>
    <li>
   
         <a href="/wangxingwu_314/article/details/8060312#comments">Android中的AlarmManager的使用</a>
    <p style="margin:0px;"><a href="/u011731233" class="user_name">u011731233</a>:
内容不错，不过排版很多内容重复了
    </p>
    </li>
</ul>
</div>
    </div>
    <div class="clear">
    </div>


                   <!-- 广告位开始 --> 
                    <ins data-revive-zoneid="190" data-revive-id="8c38e720de1c90a6f6ff52f3f89c4d57"></ins> 
                    <!-- 广告位结束 -->

           </div>   

            <div class="clear">
            </div>
        </div>

        

<script type="text/javascript" src="http://c.csdnimg.cn/rabbit/cnick/cnick.js"></script>
<script type="text/javascript" src="http://static.blog.csdn.net/scripts/newblog.min.js"></script>


<script type="text/javascript" src="http://medal.blog.csdn.net/showblogmedal.ashx?blogid=1333917"></script>
<script type="text/javascript" src="http://static.blog.csdn.net/scripts/JavaScript1.js"></script>

    <script type="text/javascript" src="http://passport.csdn.net/content/loginbox/login.js"></script>
<script type="text/javascript">document.write("<img src=http://counter.csdn.net/pv.aspx?id=24 border=0 width=0 height=0>");</script>
<script type="text/javascript" src="http://www.csdn.net/ui/scripts/Csdn/counter.js"></script>
<script type="text/javascript" src="http://ad.csdn.net/scripts/ad-blog.js"></script>
<script type="text/javascript">
    $(function () {
        function __get_code_toolbar(snippet_id) {
            return $("<span class='tracking-ad' data-mod='popu_167'><a href='https://code.csdn.net/snippets/"
                    + snippet_id
                    + "' target='_blank' title='在CODE上查看代码片'  style='text-indent:0;'><img src='https://code.csdn.net/assets/CODE_ico.png' width=12 height=12 alt='在CODE上查看代码片' style='position:relative;top:1px;left:2px;'/></a></span>"
                    + "<span class='tracking-ad' data-mod='popu_170'><a href='https://code.csdn.net/snippets/"
                    + snippet_id
                    + "/fork' target='_blank' title='派生到我的代码片' style='text-indent:0;'><img src='https://code.csdn.net/assets/ico_fork.svg' width=12 height=12 alt='派生到我的代码片' style='position:relative;top:2px;left:2px;'/></a></span>");
        }
        
        $("[code_snippet_id]").each(function () {
            __s_id = $(this).attr("code_snippet_id");
            if (__s_id != null && __s_id != "" && __s_id != 0 && parseInt(__s_id) > 70020) {
                __code_tool = __get_code_toolbar(__s_id);
                $(this).prev().find(".tools").append(__code_tool);
            }
        });

        $(".bar").show();
    });
</script>





    </div>
      <!--new top-->
    
    <script id="csdn-toolbar-id" btnId="header_notice_num" wrapId="note1" count="5" subCount="5" type="text/javascript" src="http://c.csdnimg.cn/public/common/toolbar/js/toolbar.js"></script>     <!--new top-->
   
    <link href="http://c.csdnimg.cn/comm_ask/css/ask_float_block.css" type="text/css" rel="stylesheet" />
    <script language='JavaScript' type='text/javascript' src='http://c.csdnimg.cn/comm_ask/js/libs/wmd.js'></script>
    <script language='JavaScript' type='text/javascript' src='http://c.csdnimg.cn/comm_ask/js/libs/showdown.js'></script>
    <script language='JavaScript' type='text/javascript' src='http://c.csdnimg.cn/comm_ask/js/libs/prettify.js'></script>
    <script language='JavaScript' type='text/javascript' src='http://c.csdnimg.cn/comm_ask/js/apps/ask_float_block.js'></script>
   

  <div id="a52b5334d" style="width: 1px; height: 1px; display: none;">
                    <script id="adJs52b5334"></script>
                    <script>document.getElementById("adJs52b5334").src = "http://ads.csdn.net/js/opt/52b5334.js?t=" + Math.random();</script>
   </div>

    <link rel="stylesheet" href="http://static.blog.csdn.net/css/blog_code.css" />
    <script type="text/javascript" src="http://static.blog.csdn.net/scripts/saveToCode.js"></script>
      <script type="text/javascript" src="//csdnimg.cn/rabbit/tracking-ad/main.js?75eacd8"></script>
</body>
</html>   
 